﻿function crearVisita() {
    //botonEnEspera();
    var els = $('FormularioVisita');
    var stringValue = '';
    var inputs = els.getElementsByTagName('input');
    $each(inputs, function (el, index) {
        if (stringValue != '') {
            stringValue += '&';
        }
        stringValue += el.getAttribute('id') + '=' + el.value;
    });

    var myRequest = new Request({ method: 'get', url: 'Handlers/CrearVisita.ashx', onSuccess: function (responseText, responseXML) {
        var myregexp = /^01:/im;
        __doPostBack('Marcar', responseText);
        if (new String(responseText).match(myregexp)) {
           
        }
        else {
            //showError();
        }

    }
    });
    myRequest.send(stringValue);


}
